// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_pr.p_activity;

import android.content.res.Resources;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.nnee.p_fk.cls_k;
import com.nnee.p_img.cls_d;
import com.nnee.p_pr.p_atom.cls_g;
import com.nnee.p_pr.p_atom.cls_u;
import java.util.LinkedList;

// Referenced classes of package com.nnee.p_pr.p_activity:
//            MainGridActivity, bd, dz, n

class cls_fw extends BaseAdapter
{

    private cls_fw(cls_MainGridActivity parammaingridactivity)
    {super();
        a = parammaingridactivity;
        
    }

    cls_fw(cls_MainGridActivity parammaingridactivity, cls_n n)
    {
        this(maingridactivity);
    }

    private int a()
    {
        return a.getResources().getDimensionPixelSize(0x7f090003);
    }

    private bd a(View view)
    {
        bd bd2;
        if(view == null)
        {
            bd2 = null;
        } else
        {
            bd bd1 = new bd(this, null);
            View view1 = view.findViewById(0x7f0d0055);
            if(view1 == null)
            {
                bd2 = null;
            } else
            {
                bd1.a = (ImageView)view1;
                View view2 = view.findViewById(0x7f0d0059);
                if(view2 == null)
                {
                    bd2 = null;
                } else
                {
                    bd1.b = (TextView)view2;
                    View view3 = view.findViewById(0x7f0d0057);
                    if(view3 == null)
                    {
                        bd2 = null;
                    } else
                    {
                        bd1.c = (ImageView)view3;
                        bd2 = bd1;
                    }
                }
            }
        }
        return bd2;
    }

    private void a(cls_u u1, View view)
    {
        if(view != null && u1 != null && !u1.V().equals("-1")) goto _L2; else goto _L1
_L1:
        return;
_L2:
        bd bd1 = a(view);
        if(bd1 != null)
        {
            String s = u1.U();
            if(s != null)
                bd1.b.setText(s);
            String s1 = u1.b(g.g);
            if(s1 != null)
            {
                StringBuilder stringbuilder = new StringBuilder();
                bd1.a.setTag(stringbuilder);
                d.a().a(stringbuilder, 1, s1, new dz(this, bd1), -1, -1, 0, com.nnee.p_b.p_a.cls_d.f());
            }
        }
        if(true) goto _L1; else goto _L3
_L3:
    }

    private int b()
    {
        return a.getResources().getDimensionPixelSize(0x7f090002);
    }

    public int getCount()
    {
        return cls_MainGridActivity.c(a).size();
    }

    public Object getItem(int i)
    {
        return cls_MainGridActivity.c(a).get(i);
    }

    public long getItemId(int i)
    {
        return (long)i;
    }

    public View getView(int i, View view, ViewGroup viewgroup)
    {
        if(i >= 0 && i < getCount()) goto _L2; else goto _L1
_L1:
        view = null;
_L4:
        return view;
_L2:
        cls_u u1 = (u)MainGridActivity.c(a).get(i);
        if(u1.V().equals("-1"))
        {
            if(view != null)
            {
                if((ImageView)view.findViewById(0x7f0d0054) == null)
                    view = a.getLayoutInflater().inflate(0x7f03001a, viewgroup, false);
            } else
            {
                view = a.getLayoutInflater().inflate(0x7f03001a, viewgroup, false);
            }
        } else
        {
            if(view != null)
            {
                bd bd1 = a(view);
                if(bd1 != null)
                {
                    bd1.a.setImageResource(k.a(cls_MainGridActivity.p(a)).a(0x7f02012c));
                    bd1.b.setText("");
                } else
                {
                    view = a.getLayoutInflater().inflate(0x7f03001c, viewgroup, false);
                }
            } else
            {
                view = a.getLayoutInflater().inflate(0x7f03001c, viewgroup, false);
            }
            a(u1, view);
        }
        if(true) goto _L4; else goto _L3
_L3:
    }

    private static final String b = "SourceListAdapter";
    final cls_MainGridActivity a;
}
